package com.hzy.orderSystem.entities;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author 小宝
 * @create 2021/4/17 10:04
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class Order implements Serializable {
    private Long id;
    private int status;

    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    private String handleTime;

    private List<Record> records;

    private User user;
    private Support support;

    public Order(int status, User user) {
        this.status = status;
        this.user = user;
    }

    public Order(Long id, int status, String handleTime) {
        this.id = id;
        this.status = status;
        this.handleTime = handleTime;
    }
}
